import {request} from 'umi';

export async function fetchList(body) {
  body.param = {...body.param, gender: body.param.gender === undefined ? -1 : body.param.gender};
  return request('/user/info/list', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function edit(body) {
  return request('/user/info/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

export async function status(id) {
  return request(`/user/info/status/${id}`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
  });
}
